import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/detail',
    name:'Detail',
    component: ()=>import('../views/Detail.vue')
  },
  {
    path:'/my',
    name:'My',
    component: ()=>import('../views/My.vue')
  },
  {
    path:'/login',
    name:"Login",
    component: ()=>import('../views/Login.vue')
  },
  {
    path:'/order',
    name:"Order",
    component: ()=>import('../views/Order.vue')
  },
  {
    path:'/order-list',
    name:'OrderList',
    component: ()=>import('../views/OrderList.vue')
  },
  {
    path:'/goods',
    name:'Goods',
    component: ()=>import('../views/Goods.vue')
  },
  {
    path: '/mygoods',
    name:'MyGoods',
    component: ()=>import('../views/MyGoods.vue')
  },
  {
    path:"/publish",
    name:'Publish',
    component: ()=>import('../views/publish.vue')
  },
  {
    path:"/message",
    name:"Message",
    component: ()=>import('../views/Message.vue')
  },
  {
    path: "/wait-send",
    name:"WaitSend",
    component: ()=>import('../views/WaitSend.vue')
  },
  {
    path:"/wallet",
    name:"Wallet",
    component: ()=>import('../views/wallet.vue')
  },
  {
    path:"/withdraw",
    name:"Withdraw",
    component: ()=>import('../views/Withdraw.vue')
  },
  {
    path:"/withdraw-log",
    name:"WithdrawLog",
    component: ()=>import('../views/WithdrawLog.vue')
  },
  {
    path:"/register",
    name:"Register",
    component: ()=>import('../views/Register.vue')
  },
  {
    path: "/article",
    name:"Article",
    component: ()=>import('../views/ArticleDetail.vue')
  },
  {
    path: "/article-list",
    name:"ArticleList",
    component: ()=>import('../views/ArticleList.vue')
  },
  {
    path:"/complain-list",
    name:"/ComplainList",
    component: ()=>import('../views/ComplainList.vue')
  },
  {
    path:"/complain",
    name:"/Complain",
    component: ()=>import('../views/Complain.vue')
  },
  {
    path:"/submit-complain",
    name:"/SubmitComplain",
    component: ()=>import('../views/SubmitComplain.vue')
  },
  {
    path:"/update-password",
    name:"UpdatePassword",
    component: ()=>import('../views/UpdatePassword.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
